﻿using EF_Brave.Model;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFBrave.SQLServer
{
    public partial class DefaultContext : DbContext
    {
        public DefaultContext()
            : base("name=SqlConnectionString")
        {
        }

        public virtual DbSet<Sys_User> Sys_User { get; set; }
        public virtual DbSet<Sys_Role> Sys_Role { get; set; }

        public virtual DbSet<SysUserRole> Sys_UserRoles { get; set; }
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            Database.SetInitializer<DefaultContext>(null);
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }

    }
}
